<template> 
<div class="page-container">
  <div class="toolbar">
     <el-row>
      <el-tabs type="border-card" >
       <el-tab-pane label="基本信息">
       <el-form :inline="true" :model="dataForm" label-width="180px" style="text-align:center;" ref="dataForm" :rules="dataFormRules" :disabled="this.$route.query.disabled" class="form">
       <el-row style="margin-top: -20px;" class="searchDialog-input">
       <el-divider content-position="center">
        <span style="font-size:16px;font-weight:800">基本信息</span>
       </el-divider>

       <el-form-item label="id：" v-show="false">
        <el-input v-model="dataForm.id" placeholder="请输入" ></el-input>
       </el-form-item>
       <el-form-item label="供应商编码：" prop="supplierCode">
        <el-input v-model="dataForm.supplierCode" placeholder="请输入" ></el-input>
       </el-form-item>
       <el-form-item label="用户名：" prop="userName">
        <el-input v-model="dataForm.userName" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="临时编号：" >
        <el-input v-model="dataForm.temporaryCode" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="单位名称：" prop="enterpriseName">
        <el-input v-model="dataForm.enterpriseName" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="供应商英文名称：">
        <el-input v-model="dataForm.enterpriseNameEn" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="电话：">
        <el-input v-model="dataForm.phone" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="手机：" prop="mobile">
        <el-input v-model="dataForm.mobile" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="传真：">
        <el-input v-model="dataForm.fax" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="组织机构代码：" prop="organizationCode">
        <el-input v-model="dataForm.organizationCode" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="法人代表：">
        <el-input v-model="dataForm.legalPerson" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="单位成立时间：">
            <el-date-picker v-model="dataForm.enterpriseCreateDate" type="date" placeholder="选择日期"></el-date-picker>
       </el-form-item>
       <el-form-item label="公司网站：">
        <el-input v-model="dataForm.enterpriseUrl" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="电子邮箱：">
        <el-input v-model="dataForm.enterpriseEmail" placeholder="请输入"></el-input>
       </el-form-item>
       <!-- <el-form-item label="单位总人数(范围)：1=0-50；2=51-100；3=101-500；4=501-1000；6=1000以上">
        <el-input v-model="dataForm.peopleNumber" placeholder="请输入"></el-input>
       </el-form-item> -->
       <!-- <el-form-item label="所在国家code：" >
        <el-input v-model="dataForm.countryId" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="所在国家名称：">
        <el-input v-model="dataForm.countryName" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="所在城市code：">
        <el-input v-model="dataForm.cityId" placeholder="请输入"></el-input>
       </el-form-item> -->
       <el-row :gutter="24">
          <el-col :span="12">
              <el-form-item label="所选地址：">
                <v-distpicker :province="dataForm.addressProvinceName" @province="changeProvince" :city="dataForm.addressCityName" @city="changeCity" :area="dataForm.addressAreaName" @area="changeArea"></v-distpicker>
              </el-form-item>
          </el-col>
          <el-col :span="12">
              <el-form-item label="详细地址：">
                  <el-input v-model="dataForm.cityName" auto-complete="off" placeholder="请输入详细地址"></el-input>
              </el-form-item>
          </el-col>
        </el-row>
       <!-- <el-form-item label="联系地址：" prop="cityName">
        <el-input v-model="dataForm.cityName" placeholder="请输入"></el-input>
       </el-form-item> -->
       <el-form-item label="注册地址：">
        <el-input v-model="dataForm.registerAares" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="邮编号码：">
        <el-input v-model="dataForm.postCode" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="注册资金（万元）：">
        <el-input v-model="dataForm.registerCapital" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="上年营业额（万元）：">
        <el-input v-model="dataForm.lastYearTurnover" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="资金单位code:">
        <el-select v-model="dataForm.currencyType" placeholder="请选择资金单位code">
          <el-option label="人民币" value="1"></el-option>
          <el-option label="美元" value="2"></el-option>
          <el-option label="港元" value="3"></el-option>
          <el-option label="英镑" value="4"></el-option>
          <el-option label="欧元" value="5"></el-option>
          <el-option label="日元" value="6"></el-option>
        </el-select>
       </el-form-item>
       <!-- <el-form-item label="银行信用级别：1AAA级；2AA级；3A级；4BBB级；5BB级；6B级；7C级">
        <el-input v-model="dataForm.creditLevel" placeholder="请输入"></el-input>
       </el-form-item> -->
       <el-form-item label="是否上市：" label-width="150px">
        <el-select v-model="dataForm.equityMarket" placeholder="请选择是否上市">
          <el-option label="是" value="1"></el-option>
          <el-option label="否" value="2"></el-option>
        </el-select>
       </el-form-item>
       <!-- <el-form-item label="企业性质：1外商独资；2合资；3私营；4国营">
        <el-input v-model="dataForm.enterpriseNature" placeholder="请输入"></el-input>
       </el-form-item> -->
       <!-- <el-form-item label="是否中国大陆注册供应商：1是；2否">
        <el-input v-model="dataForm.chineseMainlandRegister" placeholder="请输入"></el-input>
       </el-form-item> -->
       <el-form-item label="纳税人类型：">
        <el-select v-model="dataForm.taxpayerType" placeholder="请选择纳税人类型">
          <el-option label="小规模纳税人" value="1"></el-option>
          <el-option label="一般纳税人" value="2"></el-option>
        </el-select>
       </el-form-item>
       <el-form-item label="税号：">
        <el-input v-model="dataForm.taxNumber" placeholder="请输入"></el-input>
       </el-form-item>
       <!-- <el-form-item label="OEM能力：1是；2否">
        <el-input v-model="dataForm.oem" placeholder="请输入"></el-input>
       </el-form-item> -->
       <el-form-item label="配送范围（省份code）：">
        <el-input v-model="dataForm.distributionScope" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="单位简介：">
        <el-input v-model="dataForm.enterpriseRemark" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="经营范围：">
        <el-input v-model="dataForm.officeFurniture" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="经营范围：">
        <el-input v-model="dataForm.commercialEquipment" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="经营范围：">
        <el-input v-model="dataForm.computerAndParts" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="经营范围：">
        <el-input v-model="dataForm.specialArticles" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="经营范围：">
        <el-input v-model="dataForm.paperFoodFurnitureOne" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="经营范围：">
        <el-input v-model="dataForm.paperFoodFurnitureTwo" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="经营范围：">
        <el-input v-model="dataForm.paperFoodFurnitureThree" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="经营范围：">
        <el-input v-model="dataForm.businessServices" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="经营范围：">
        <el-input v-model="dataForm.officeStationeryInstrument" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="经营范围：">
        <el-input v-model="dataForm.installationWarranty" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="经营范围：">
        <el-input v-model="dataForm.storeRetail" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="经营范围：">
        <el-input v-model="dataForm.other" placeholder="请输入"></el-input>
       </el-form-item>
       <!-- <el-form-item label="税率code：1=0%；2=3%；3=6%；4=8%；5=13%；6=16%；7=17%">
        <el-input v-model="dataForm.taxRate" placeholder="请输入"></el-input>
       </el-form-item> -->
       <el-form-item label="适用税率范围：">
        <el-input v-model="dataForm.suitableRange" placeholder="请输入"></el-input>
       </el-form-item>
       <!-- <el-form-item label="出具发票类型code：1增票；2普票">
        <el-input v-model="dataForm.invoiceType" placeholder="请输入"></el-input>
       </el-form-item> -->
       <!-- <el-form-item label="是否为主税务信：1是；2否">
        <el-input v-model="dataForm.mainTaxLetter" placeholder="请输入"></el-input>
       </el-form-item> -->
       <el-form-item label="附件路径：" label-width="195px">
        <el-input v-model="dataForm.enclosureUrl" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="供应商使用期限：">
        <el-input v-model="dataForm.supplierExpire" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="状态：">
        <el-select v-model="dataForm.status" placeholder="请选择状态">
          <el-option label="可用" value="0"></el-option>
          <el-option label="停用" value="1"></el-option>
        </el-select>
       </el-form-item>
       <el-form-item label="运营方ID：" >
        <el-input v-model="dataForm.deptId" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="商家ID：">
        <el-input v-model="dataForm.merchantId" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="商家名称：" >
        <el-input v-model="dataForm.merchantName" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="店铺Id：">
        <el-input v-model="dataForm.storeId" placeholder="请输入"></el-input>
       </el-form-item>
       <el-form-item label="店铺名称：">
        <el-input v-model="dataForm.storeName" placeholder="请输入"></el-input>
       </el-form-item>
     
       <!-- <el-form-item label="删除标志，0：未删除；1：已删除">
        <el-input v-model="dataForm.deleteFlag" placeholder="请输入"></el-input>
       </el-form-item> -->
       </el-row>
      </el-form>
      <div class="tool-wrap">
       <div class="left-area">
        <el-button-group>
         <el-button type="primary" size="small" @click="submitForm()" >保存</el-button>
         <el-button type="primary" size="small" @click="$router.go(-1)">取消</el-button>
        </el-button-group>
       </div>
      </div>
     </el-tab-pane>
    </el-tabs>
   </el-row>
  </div>
 </div>
</template>
<script>
//一.导包区
import jicTable from '@/components/jicComponentGallery/jicTable'; 
import {mapState} from "vuex"; 
import ThemePicker from "@/components/ThemePicker"; 
import LangSelector from "@/components/LangSelector"; 
import VDistpicker from 'v-distpicker'; 
import elTree from '@/views/tree/src/tree.vue' 

//二.数据输出区
export default {

//2.1 注册组件
components: {
 jicTable,
 ThemePicker,
 LangSelector,
 VDistpicker,
 elTree,
},

//2.2 数据初始化区
data() {
 return {

  //2.2.1 公共数据初始化
  searchSize: 'mini',
  //disabled:false,
// 2.2.2 form 表单数据初始化 
  dataForm: {
    id:null,
   supplierCode:null, 
   userName:null, 
   temporaryCode:null, 
   enterpriseName:null, 
   enterpriseNameEn:null, 
   phone:null, 
   mobile:null, 
   fax:null, 
   organizationCode:null, 
   legalPerson:null, 
   enterpriseCreateDate:null, 
   enterpriseUrl:null, 
   enterpriseEmail:null, 
   peopleNumber:null, 
   countryId:null, 
   countryName:null, 
   cityId:null, 
   cityName:null, 
   registerAares:null, 
   postCode:null, 
   registerCapital:null, 
   lastYearTurnover:null, 
   currencyType:null, 
   creditLevel:null, 
   equityMarket:null, 
   enterpriseNature:null, 
   chineseMainlandRegister:null, 
   taxpayerType:null, 
   taxNumber:null, 
   oem:null, 
   distributionScope:null, 
   enterpriseRemark:null, 
   officeFurniture:null, 
   commercialEquipment:null, 
   computerAndParts:null, 
   specialArticles:null, 
   paperFoodFurnitureOne:null, 
   paperFoodFurnitureTwo:null, 
   paperFoodFurnitureThree:null, 
   businessServices:null, 
   officeStationeryInstrument:null, 
   installationWarranty:null, 
   storeRetail:null, 
   other:null, 
   taxRate:null, 
   suitableRange:null, 
   invoiceType:null, 
   mainTaxLetter:null, 
   enclosureUrl:null, 
   supplierExpire:null, 
   status:null, 
   deptId:null, 
   merchantId:null, 
   merchantName:null, 
   storeId:null, 
   storeName:null, 
   createTime:null, 
   creator:null, 
   updateTime:null, 
   updator:null, 
   deleteFlag:null,
   addressProvinceId: null,
   addressCityId: null,
   addressAreaId: null,
   addressProvinceName: null,
   addressCityName: null,
   addressAreaName: null, 
},
//trigger 为blur 表示丢失焦点;为change 表示值发生变化;
  dataFormRules: {
   id:[ 
   { required: true, message: "请输入id", trigger: "blur" }, 
   { min: 0, max: 20, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   supplierCode:[ 
   { required: true, message: "请输入供应商编码", trigger: "blur"  }, 
   { min: 0, max: 20, message: "长度在 0 到 20 个字符", trigger: "blur" },
   {pattern:/[^\u4e00-\u9fa5]+$/, message: '请输入非中文字符工号', trigger: 'blur'}, 
   ], 
   userName:[ 
   { required: true, message: "请输入用户名", trigger: "blur" }, 
   { min: 0, max: 20, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   temporaryCode:[ 
   { required: true, message: "请输入临时编号", trigger: "blur" }, 
   { min: 0, max: 20, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   enterpriseName:[ 
   { required: true, message: "请输入单位名称", trigger: "blur" }, 
   { min: 0, max: 20, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   enterpriseNameEn:[ 
   { required: true, message: "请输入供应商英文名称", trigger: "blur" }, 
   { min: 0, max: 100, message: "长度在 0 到 100 个字符", trigger: "blur" }, 
   ], 
   phone:[ 
   { required: true, message: "请输入电话", trigger: "blur" }, 
   { min: 0, max: 20, message: "长度在 0 到 20 个数字", trigger: "blur" }, 
   ], 
   mobile:[ 
   { required: true, message: "请输入手机", trigger: "blur" }, 
   { min: 11, max: 11, message: "请输入11位手机号码", trigger: "blur" },
   { pattern:/^1[345789]\d{9}$/, message: '仅支持大陆手机号', trigger: 'blur'}, 
   ], 
   fax:[ 
   { required: true, message: "请输入传真", trigger: "blur" }, 
   { min: 0, max: 20, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   organizationCode:[ 
   { required: true, message: "请输入组织机构代码", trigger: "blur" }, 
   { min: 0, max: 100, message: "长度在 0 到 100 个字符", trigger: "blur" }, 
   ], 
   legalPerson:[ 
   { required: true, message: "请输入法人代表", trigger: "blur" }, 
   { min: 0, max: 20, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   enterpriseCreateDate:[ 
   { required: true, message: "请输入单位成立时间", trigger: "blur" }, 
   { min: 0, max: 20, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   enterpriseUrl:[ 
   { required: true, message: "请输入公司网站", trigger: "blur" }, 
   { min: 0, max: 100, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   enterpriseEmail:[ 
   { required: true, message: "请输入电子邮箱", trigger: "blur" }, 
   { min: 0, max: 50, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   peopleNumber:[ 
   { required: true, message: "请输入单位总人数(范围)：1=0-50；2=51-100；3=101-500；4=501-1000；6=1000以上", trigger: "blur" }, 
   { min: 0, max: 50, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
  //  countryId:[ 
  //  { required: true, message: "请输入所在国家code", trigger: "blur" }, 
  //  { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
  //  ], 
  //  countryName:[ 
  //  { required: true, message: "请输入所在国家名称", trigger: "blur" }, 
  //  { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
  //  ], 
  //  cityId:[ 
  //  { required: true, message: "请输入所在城市code", trigger: "blur" }, 
  //  { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
  //  ], 
   cityName:[ 
   { required: true, message: "请输入联系地址", trigger: "blur" }, 
   { min: 0, max: 100, message: "长度在 0 到 100 个字符", trigger: "blur" }, 
   ], 
   registerAares:[ 
   { required: true, message: "请输入注册地址", trigger: "blur" }, 
   { min: 0, max: 100, message: "长度在 0 到 100 个字符", trigger: "blur" }, 
   ], 
   postCode:[ 
   { required: true, message: "请输入邮编号码", trigger: "blur" }, 
   { min: 6, max: 6, message: "长度在 0 到 6 位数字", trigger: "blur" }, 
   ], 
   registerCapital:[ 
   { required: true, message: "请输入注册资金（万元）", trigger: "blur" }, 
   { min: 0, max: 100, message: "长度在 0 到 100 个字符", trigger: "blur" }, 
   ], 
   lastYearTurnover:[ 
   { required: true, message: "请输入上年营业额（万元）", trigger: "blur" }, 
   { min: 0, max: 100, message: "长度在 0 到 100 个字符", trigger: "blur" }, 
   ], 
   currencyType:[ 
   { required: true, message: "请输入资金单位code：1人民币；2美元；3港元；4英镑；5欧元；6日元", trigger: "blur" }, 
   { min: 0, max: 100, message: "长度在 0 到 100 个字符", trigger: "blur" }, 
   ], 
   creditLevel:[ 
   { required: true, message: "请输入银行信用级别：1AAA级；2AA级；3A级；4BBB级；5BB级；6B级；7C级", trigger: "blur" }, 
   { min: 0, max: 20, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   equityMarket:[ 
   { required: true, message: "请输入是否上市：1是；2否", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   enterpriseNature:[ 
   { required: true, message: "请输入企业性质：1外商独资；2合资；3私营；4国营", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   chineseMainlandRegister:[ 
   { required: true, message: "请输入是否中国大陆注册供应商：1是；2否", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   taxpayerType:[ 
   { required: true, message: "请输入纳税人类型：1小规模纳税人；2一般纳税人", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   taxNumber:[ 
   { required: true, message: "请输入税号", trigger: "blur" }, 
   { min: 0, max: 50, message: "长度在 0 到 50 个字符", trigger: "blur" }, 
   ], 
   oem:[ 
   { required: true, message: "请输入OEM能力：1是；2否", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   distributionScope:[ 
   { required: true, message: "请输入配送范围（省份code）", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   enterpriseRemark:[ 
   { required: true, message: "请输入单位简介", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   officeFurniture:[ 
   { required: true, message: "请输入经营范围：办公家具", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   commercialEquipment:[ 
   { required: true, message: "请输入经营范围：商用设备", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   computerAndParts:[ 
   { required: true, message: "请输入经营范围：电脑及配件", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   specialArticles:[ 
   { required: true, message: "请输入经营范围：专用/无编码用品", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   paperFoodFurnitureOne:[ 
   { required: true, message: "请输入经营范围：纸制品/食品及家具用品1", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   paperFoodFurnitureTwo:[ 
   { required: true, message: "请输入经营范围：纸制品/食品及家具用品2", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   paperFoodFurnitureThree:[ 
   { required: true, message: "请输入经营范围：纸制品/食品及家具用品3", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   businessServices:[ 
   { required: true, message: "请输入经营范围：商务服务", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   officeStationeryInstrument:[ 
   { required: true, message: "请输入经营范围：办公文仪", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   installationWarranty:[ 
   { required: true, message: "请输入经营范围：安装和保修", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   storeRetail:[ 
   { required: true, message: "请输入经营范围：门店和零售用品", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   other:[ 
   { required: true, message: "请输入经营范围：其他", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   taxRate:[ 
   { required: true, message: "请输入税率code：1=0%；2=3%；3=6%；4=8%；5=13%；6=16%；7=17%", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   suitableRange:[ 
   { required: true, message: "请输入适用税率范围", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   invoiceType:[ 
   { required: true, message: "请输入出具发票类型code：1增票；2普票", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   mainTaxLetter:[ 
   { required: true, message: "请输入是否为主税务信：1是；2否", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   enclosureUrl:[ 
   { required: true, message: "请输入附件路径", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   supplierExpire:[ 
   { required: true, message: "请输入供应商使用期限", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   status:[ 
   { required: true, message: "请输入状态,0代表可用，1代表停用", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   deptId:[ 
   { required: true, message: "请输入运营方ID", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   merchantId:[ 
   { required: true, message: "请输入商家ID", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   merchantName:[ 
   { required: true, message: "请输入商家名称", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   storeId:[ 
   { required: true, message: "请输入店铺Id", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   storeName:[ 
   { required: true, message: "请输入店铺名称", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   createTime:[ 
   { required: true, message: "请输入创建日期", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   creator:[ 
   { required: true, message: "请输入创建人", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   updateTime:[ 
   { required: true, message: "请输入更新日期", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   updator:[ 
   { required: true, message: "请输入更新人", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
   deleteFlag:[ 
   { required: true, message: "请输入删除标志，0：未删除；1：已删除", trigger: "blur" }, 
   { min: 3, max: 5, message: "长度在 0 到 20 个字符", trigger: "blur" }, 
   ], 
},
   //dialogVisible: false, //// 是否显示弹窗内容;
   //editDialogVisible1: false,//// 是否可编辑弹窗内容;
   //editLoading: false,////是否显示加载时动画效果;





   }//return 完结;
  },//data()方法 完结;

//2.3 Vue 方法区
methods: {
//2.3.1 公共方法区
 changeProvince(data) {
            this.dataForm.addressProvinceId = data.code;
            this.dataForm.addressProvinceName = data.value;
        },
        changeCity(data) {
            this.dataForm.addressCityId = data.code;
            this.dataForm.addressCityName = data.value;
        },
        changeArea(data) {
            this.dataForm.addressAreaId = data.code;
            this.dataForm.addressAreaName = data.value;
        },
//2.请求列表数据
getDetail() {
 let this_ = this;
 if (this.$route.query != null && this.$route.query.id != null && this.$route.query.id != '' && this.$route.query.id != "undefined") {
  let params = {};
  params.id = this.$route.query.id;
  this.utils.request.getSupplierEnterpriseInfoDetail(params, function (res) {
  if (res.code === "0000") {
   this_.dataForm = res.data;
  } else {
   this_.$message({message: "操作失败, " + data.msg, type: "error"});
   }
  });
 }
},

submitForm: function() {
  this.$refs.dataForm.validate(valid => {
  if (valid) {
   this.$confirm("确认提交吗？", "提示", {}).then(() => {
     this.editLoading = true;
     let params = Object.assign({}, this.dataForm);
     this.utils.request.saveSupplierEnterpriseInfo(params, this.editInfoBack);
     this.$router.go(-1);
  });
  }
  });
},
// 7.页面弹窗处理方法
add() {
this.dialogVisible = true;
},

// 8.关闭弹窗
handleClose() {
this.dialogVisible = false;
},

/*图片预览*/
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
},
/*图片移除*/
handleRemove(file, fileList) {
console.log(file, fileList);
},
//==========2.3.1 JavaScript 自定义方法区==========





},
//1.初始化页面调用方法(dom元素绑定后再执行初始化数据操作)
mounted() {
  //debugger;
 //this.disabled = this.$route.query.disabled;
 this.getDetail();
},

}
</script>
<style lang="scss" scoped>
  /* ele组件样式重置 */
  .common-content {
    padding: 10px;
    box-sizing: border-box;

    .search-wrap /deep/ {
      .el-form-item__label {
        height: 32px;
        line-height: 32px;
      }

      .el-form-item__content {
        height: 32px;
        line-height: 32px;
        width: 150px;
      }

      .el-input--mini .el-input__inner {
        height: 32px;
        line-height: 32px;
      }

      .el-date-editor.el-input, .el-date-editor.el-input__inner {
        width: 150px;
      }
    }

    /* 多日期样式重置 */
    .el-dater /deep/ .el-form-item__content {
      width: 330px;
    }

    /* 通用工具部分样式 */
    .tool-wrap {
      width: 100%;
      height: auto;
      position: relative;
      overflow: hidden;

      .left-area {
        float: left;
        width: 50%;
        text-align: left;

        button {
          margin-right: 15px;
          border-radius: 5px;
        }
      }

      .right-area {
        float: right;
        width: 50%;
        text-align: right;
      }
    }

    /* 表格部分样式 */
    .table-wrap {
      width: 100%;
      max-height: 600px;
      margin-top: 20px;
    }

    /* 弹窗样式 */
    .dialog-wrap /deep/ .el-dialog__footer {
      text-align: center !important;
    }
  }
</style>
